<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="net.ssta.core.db.Record"%>
<%@ page import="net.ssta.core.db.RecordSet"%>
<%@ page import="java.util.*"%>
<%
String path = request.getContextPath();
Record investinfo = (Record)request.getAttribute("investInfo");
RecordSet newEnerClass = (RecordSet)request.getAttribute("newenergyclass");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
    <TITLE>信息管理-安全生产科技成果推广网</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <META http-equiv=x-ua-compatible content=ie=7>
    <META content="MSHTML 6.00.6000.17107" name=GENERATOR>
    <LINK href="<%=path%>/includes/Fvalidate/style.css" type=text/css rel=stylesheet>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/includes/KindEditor/kindeditor.js"></script>    
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/Fvalidate.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    
    <SCRIPT>  
	$(document).ready(function(){
	$("#frm").Fvalidate({live:true});
    //富文本编辑器
    KE.show({
		id : 'editorContent',
		resizeMode : 1,
		allowUpload : true,
		afterCreate : function(id) {},
		filterMode : true,
		
		items : ["source","|","fullscreen","undo","redo","print","cut","copy","paste","plainpaste",
"wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","|","selectall","-","title","fontname","fontsize","|","textcolor","bgcolor","bold","italic","underline","strikethrough","removeformat","|","image","flash","media","advtable","hr","emoticons","link","unlink","|","about"]
		});
		
		KE.show({
		id : 'marketContent',
		resizeMode : 1,
		allowUpload : true,
		afterCreate : function(id) {},
		filterMode : true,
		
		items : ["source","|","fullscreen","undo","redo","print","cut","copy","paste","plainpaste",
"wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","|","selectall","-","title","fontname","fontsize","|","textcolor","bgcolor","bold","italic","underline","strikethrough","removeformat","|","image","flash","media","advtable","hr","emoticons","link","unlink","|","about"]
		});
	
	});
	
	function saveEditContent(){
		
		if(checkinput()){
			content = KE.util.getPureData("editorContent");
			htmlcontent = KE.html("editorContent");
			
			document.getElementById("INVEST_INTRO").value=content;
			document.getElementById("INVEST_INTROHTML").value=htmlcontent;
			
			marketcontent = KE.util.getPureData("marketContent");
			htmlmarketcontent = KE.html("marketContent");
			
			document.getElementById("INVEST_BENEFITANALY").value = marketcontent;
			document.getElementById("INVEST_BENEFITANALYHTML").value = htmlmarketcontent;
			
			document.frm.action="<%=path%>/membercenter/market?method=addInvest";
			document.frm.submit();
		}
	}
	
	function checkinput(){
		if(!$("#frm").Fvalidate()){return false;}
		var ck = document.getElementsByName("INVEST_COOPERATEWAY");
		var checkedcount = 0;
		for(i=0;i<ck.length;i++){
			if(ck[i].checked){
				checkedcount++;
				break;
			}
		}
		if(checkedcount<1){
			alert("[合作方式]不能为空");
			return false;
		}
		if(KE.util.getPureData("editorContent")==null || KE.util.getPureData("editorContent").length<20){
			alert("[投融资项目简要说明]请输入20个汉字以上");
			return false;
		}
		if(KE.util.getPureData("marketContent")==null || KE.util.getPureData("marketContent").length<20){
			alert("[市场及经济效益说明]请输入20个汉字以上");
			return false;
		}
		return true;
	}
	function chooseOne(obj){
		var ck = document.getElementsByName(obj.name);
		for(i=0;i<ck.length;i++){
			if(ck[i].value != obj.value){
				ck[i].checked = false;
			}
		}
	}
    </SCRIPT>    
</HEAD>

<BODY>
<form  id="frm" name="frm"  method="post">
	<input type="hidden" name="uuid" id="uuid" value="<%=investinfo.getString('ID','')%>">
	<table cellpadding="0" cellspacing="0" border="0" class="ctable" style="border-left:1px solid #99bbe8;border-bottom:1px solid #99bbe8;border-right:0px solid red;" align="center">
    	<tr>
        	<td width="160" height="30">投融资项目名称：</td>
            <td width="640"><input type="text"  id="INVEST_TITLE" name="INVEST_TITLE" readonly  size="60" value="<%=investinfo.getString("TITLE","")%>" class="input_text_grey" required="" label="投融资项目名称"></td>
        </tr>
        <tr>
        	<td width="160" height="30">所属行业领域：</td>
            <td width="640">
            <%
			String classcode=investinfo.getString("NEWENERGYCLASS","");
			%>
            <select name="INVEST_NEWENERGYCLASS" id="INVEST_NEWENERGYCLASS"  readonly >
				<option value="">请选择</option>
			 	<%
				for(int i=0;i<newEnerClass.size();i++){
					Record ecRecord = newEnerClass.get(i);
				%>
					<option <%=classcode.equals(ecRecord.getString("OPTIONVALUE","").trim())?"selected":"aaa"%> value="<%=ecRecord.getString("OPTIONVALUE","").trim()%>"><%=ecRecord.getString("OPTIONNAME","")%></option>
			   <%
			   }
			   %>
            </select>
          </td>
        </tr>
        <tr>
        	<td width="160" height="30">关键词：</td>
            <td width="640"><input type="text" id="INVEST_TOPICWORDS" readonly  name="INVEST_TOPICWORDS" size="40" value="<%=investinfo.getString("TOPICWORDS","")%>" class="input_text_grey"  required="" label="关键词"></td>
        </tr>
        <tr>
        	<td width="160" height="30">合作方式：</td>
            <td width="640"><%String cooperateway=investinfo.getString("COOPERATEWAY","");%>
 	           	<input type="checkbox" readonly  name="INVEST_COOPERATEWAY"   value="1" onClick="chooseOne(this)" label="合作方式" <%if("1".equals(cooperateway)){%>checked<%}%>>合资
                <input type="checkbox" readonly  name="INVEST_COOPERATEWAY"   value="2" onClick="chooseOne(this)" label="合作方式" <%if("2".equals(cooperateway)){%>checked<%}%>>合作
                <input type="checkbox" readonly  name="INVEST_COOPERATEWAY"   value="3" onClick="chooseOne(this)" label="合作方式" <%if("3".equals(cooperateway)){%>checked<%}%>>技术引进
                <input type="checkbox" readonly  name="INVEST_COOPERATEWAY"   value="4" onClick="chooseOne(this)" label="合作方式" <%if("4".equals(cooperateway)){%>checked<%}%>>设备引进
                <input type="checkbox" readonly  name="INVEST_COOPERATEWAY"   value="5" onClick="chooseOne(this)" label="合作方式" <%if("5".equals(cooperateway)){%>checked<%}%>>补偿贸易
                <input type="checkbox" readonly  name="INVEST_COOPERATEWAY"   value="6" onClick="chooseOne(this)" label="合作方式" <%if("6".equals(cooperateway)){%>checked<%}%>>产权转让
                <input type="checkbox" readonly  name="INVEST_COOPERATEWAY"   value="7" onClick="chooseOne(this)" label="合作方式" <%if("7".equals(cooperateway)){%>checked<%}%>>面议
          </td>
        </tr>
        <tr>
        	<td width="160" height="30">联系单位：</td>
            <td width="640"><input type="text"  id="INVEST_LINKUNIT" readonly  name="INVEST_LINKUNIT"  size="60" value="<%=investinfo.getString("LINKUNIT","")%>" class="input_text_grey" required="" label="联系单位"></td>
        </tr>
        <tr>
        	<td width="160" height="30">联系人：</td>
            <td width="640"><input type="text"  readonly  id="INVEST_LINKMAN" name="INVEST_LINKMAN"  size="30" value="<%=investinfo.getString("LINKMAN","")%>"  class="input_text_grey" required="" label="联系人"></td>
        </tr>
        <tr>
        	<td width="160" height="30">联系人电话：</td>
            <td width="640"><input type="text"  id="INVEST_TEL" readonly  name="INVEST_TEL"  size="30" value="<%=investinfo.getString("TEL","")%>"  class="input_text_grey" required="" label="联系电话"></td>
        </tr>
        <tr>
        	<td width="160" height="30">联系人手机：</td>
            <td width="640"><input type="text"  readonly  id="INVEST_CELLPHONE" name="INVEST_CELLPHONE"  size="30" value="<%=investinfo.getString("CELLPHONE","")%>"  class="input_text_grey"></td>
        </tr>
        <tr>
        	<td width="160" height="30">联系人Email：</td>
            <td width="640"><input type="text"  readonly  id="INVEST_EMAIL" name="INVEST_EMAIL"  size="30" value="<%=investinfo.getString("EMAIL","")%>"  class="input_text_grey" required="" rule="email" label="联系人Email"></td>
        </tr>
        <tr>
        	<td width="160" height="30">通讯地址：</td>
            <td width="640"><input type="text"  readonly  id="INVEST_ADDR" name="INVEST_ADDR"  size="60" value="<%=investinfo.getString("ADDR","")%>" class="input_text_grey" required="" label="通讯地址"></td>
      	</tr>
        <tr>
        	<td width="160" height="30">邮编：</td>
            <td width="640"><input type="text"  readonly  id="INVEST_ZIP" name="INVEST_ZIP"  size="10" value="<%=investinfo.getString("ZIP","")%>" class="input_text_grey" required="" label="邮政编码"></td>
        </tr>
        <tr>
        	<td width="160" height="30">项目拟投总额(万元)：</td>
            <td width="640">
            	<input type="text"  readonly  id="INVEST_INVESTSUMEXPECT" name="INVEST_INVESTSUMEXPECT"  size="10" value="<%=investinfo.getString("INVESTSUMEXPECT","")%>" class="input_text_grey" required="" label="项目拟投资总额" rule="number">
            	<span class="pmodify_text">	请输入整数倍金额，例如：10</span>
            </td>
        </tr>
        <tr>
        	<td width="160" height="30">项目已投入金额(万元)：</td>
            <td width="640">
            	<input type="text"  readonly  id="INVEST_INVESTEDSUM" name="INVEST_INVESTEDSUM"  size="10" class="input_text_grey" value="<%=investinfo.getString("INVESTEDSUM","")%>"  required="" label="项目已投入金额" rule="number">
                <span class="pmodify_text">	请输入整数倍金额，例如：10</span>
            </td>
        </tr>
        <tr>
        	<td width="160" height="30">项目建设年限(年)：</td>
            <td width="640">
            	<input type="text"  id="INVEST_FIXEDYEAR" name="INVEST_FIXEDYEAR"  size="10" class="input_text_grey" value="<%=investinfo.getString("FIXEDYEAR","")%>" required="" label="项目建设年限" rule="number">
                <span class="pmodify_text">	请输入整数年，例如：10</span>
            </td>
        </tr>
        <tr>
        	<td width="160" height="30">信息有效期：</td>
            <td width="640"><input type="text"  readonly  id="INVEST_VALID" name="INVEST_VALID"  onClick="WdatePicker()" size="10" value="<%=investinfo.getString("VALID","")%>" class="input_text_grey" readonly  required="" label="信息有效期"></td>
        </tr>
        <tr>
        	<td width="160" height="30">投融资项目简要说明：</td>
            <td width="640">
            <input type="hidden"  id="INVEST_INTRO" name="INVEST_INTRO" value="" class="input_text_grey">
            <input type="hidden"  id="INVEST_INTROHTML" name="INVEST_INTROHTML" value="" class="input_text_grey">
            
            <textarea class=""  readonly  id ="editorContent" name="editorContent" error="正文内容不能为空或过于简洁！" label="投融资项目简要说明" style="width:98%;height:195px;visibility:hidden;word-wrap:break-word;word-break:break-all;"><%=investinfo.getString("INTROHTML","")%></textarea>
          </td>
        </tr>
        <tr>
        	<td width="160" height="30">市场及经济效益说明：</td>
            <td width="640">
            <input type="hidden"  id="INVEST_BENEFITANALY" name="INVEST_BENEFITANALY" value="" class="input_text_grey">
            <input type="hidden"  id="INVEST_BENEFITANALYHTML" name="INVEST_BENEFITANALYHTML" value="" class="input_text_grey">
            <textarea class=""  readonly  id ="marketContent" name="marketContent" error="正文内容不能为空或过于简洁！" label="市场及经济效益说明" style="width:98%;height:195px;visibility:hidden;word-wrap:break-word;word-break:break-all;"><%=investinfo.getString("BENEFITANALYHTML","")%></textarea>
          </td>
        </tr>
        <tr>
        	<td colspan="2" height="50" align="center">
            <input type="button" onClick="javascript:saveEditContent();" name="addtech" value="提交" /> 
            </td>
        </tr>
	</table>
    
</form>
</BODY>
</HTML>
